import request from '@/utils/request';

export function deleteById(pageId) {
    return request({
        url: `/portal/delete.action?pageId=${pageId}`,
        method: "get"
    });
}

export function getById(pageId) {
    return request({
        url: `/portal/get.action?pageId=${pageId}`,
        method: "get"
    });
}

export function shareGet(token) {
    return request({
        url: `/portal/share/get.action?token=${token}`,
        method: "get"
    });
}

export function list(page, rows) {
    return request({
        url: `/portal/list.action?page=${page}&rows=${rows}`,
        method: "get"
    });
}

export function rename(portal) {
    return request({
        url: `/portal/rename.action?portal=${portal}`,
        method: "POST"
    });
}

export function save(portal) {
    return request({
        url: `/portal/save.action`,
        method: "POST",
        data: portal
    });
}


